<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TSlideMenu类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_slide_menu-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TSlideMenu类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TSlideMenu 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_slide_menu.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a95d6aeae3dc4592f4c47aad6a43fa944"><td class="memItemLeft" align="right" valign="top"><a id="a95d6aeae3dc4592f4c47aad6a43fa944"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TSlideMenu</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a95d6aeae3dc4592f4c47aad6a43fa944"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24e9e4951557da2108f5b12a8242a728"><td class="memItemLeft" align="right" valign="top"><a id="a24e9e4951557da2108f5b12a8242a728"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TSlideMenu</b> (const slide_menu_t *nativeObj)</td></tr>
<tr class="separator:a24e9e4951557da2108f5b12a8242a728"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6ae19cdb4dd5468d0c2793871ed82e3"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#af6ae19cdb4dd5468d0c2793871ed82e3">SetValue</a> (uint32_t value)</td></tr>
<tr class="separator:af6ae19cdb4dd5468d0c2793871ed82e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74688e1f3124fe09e581a2f44796dae0"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a74688e1f3124fe09e581a2f44796dae0">SetAlignV</a> (align_v_t align_v)</td></tr>
<tr class="separator:a74688e1f3124fe09e581a2f44796dae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b51f6780e395f094ff9072d5fc7889e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a1b51f6780e395f094ff9072d5fc7889e">SetMinScale</a> (float_t min_scale)</td></tr>
<tr class="separator:a1b51f6780e395f094ff9072d5fc7889e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a872bbcefb4367a963acbfe248013e993"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a872bbcefb4367a963acbfe248013e993">SetSpacer</a> (int32_t spacer)</td></tr>
<tr class="separator:a872bbcefb4367a963acbfe248013e993"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac38379ff086dbc64f134233ff6b0584e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#ac38379ff086dbc64f134233ff6b0584e">SetMenuW</a> (const char *menu_w)</td></tr>
<tr class="separator:ac38379ff086dbc64f134233ff6b0584e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b51ea81d6ea60c82e5b525bc325aaa1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a8b51ea81d6ea60c82e5b525bc325aaa1">SetClip</a> (bool clip)</td></tr>
<tr class="separator:a8b51ea81d6ea60c82e5b525bc325aaa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1d46949432b6415acff3a84b4ffbe9f"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#ac1d46949432b6415acff3a84b4ffbe9f">ScrollToPrev</a> ()</td></tr>
<tr class="separator:ac1d46949432b6415acff3a84b4ffbe9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70e44195c0d7ed83adccaef2d1604092"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a70e44195c0d7ed83adccaef2d1604092">ScrollToNext</a> ()</td></tr>
<tr class="separator:a70e44195c0d7ed83adccaef2d1604092"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbefd47c544273f9c8b75fc4685474ec"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#acbefd47c544273f9c8b75fc4685474ec">GetValue</a> () const</td></tr>
<tr class="separator:acbefd47c544273f9c8b75fc4685474ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1314ade493180f3d4993718b00b37f11"><td class="memItemLeft" align="right" valign="top">align_v_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a1314ade493180f3d4993718b00b37f11">GetAlignV</a> () const</td></tr>
<tr class="separator:a1314ade493180f3d4993718b00b37f11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a98116591ec24b56575380c17fb05bc"><td class="memItemLeft" align="right" valign="top">float_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a3a98116591ec24b56575380c17fb05bc">GetMinScale</a> () const</td></tr>
<tr class="separator:a3a98116591ec24b56575380c17fb05bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a095c560b4e3776df7561698400234525"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a095c560b4e3776df7561698400234525">GetSpacer</a> () const</td></tr>
<tr class="separator:a095c560b4e3776df7561698400234525"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafc5645fc595f3eac948f49059d50e86"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#aafc5645fc595f3eac948f49059d50e86">GetMenuW</a> () const</td></tr>
<tr class="separator:aafc5645fc595f3eac948f49059d50e86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c56e563a6d2d296392d4153171dde1b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a1c56e563a6d2d296392d4153171dde1b">GetClip</a> () const</td></tr>
<tr class="separator:a1c56e563a6d2d296392d4153171dde1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a5ab7e0556b4b272bf0ee22d761f4fdc1"><td class="memItemLeft" align="right" valign="top"><a id="a5ab7e0556b4b272bf0ee22d761f4fdc1"></a>
static <a class="el" href="class_t_slide_menu.html">TSlideMenu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a5ab7e0556b4b272bf0ee22d761f4fdc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3ccc3ca0f7b3216388807417eb7cf05"><td class="memItemLeft" align="right" valign="top"><a id="ab3ccc3ca0f7b3216388807417eb7cf05"></a>
static <a class="el" href="class_t_slide_menu.html">TSlideMenu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:ab3ccc3ca0f7b3216388807417eb7cf05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11047f6ad01a3884858ff90fdd54ea6e"><td class="memItemLeft" align="right" valign="top"><a id="a11047f6ad01a3884858ff90fdd54ea6e"></a>
static <a class="el" href="class_t_slide_menu.html">TSlideMenu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a11047f6ad01a3884858ff90fdd54ea6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1108e3cd98c051360fe848cba003b587"><td class="memItemLeft" align="right" valign="top"><a id="a1108e3cd98c051360fe848cba003b587"></a>
static <a class="el" href="class_t_slide_menu.html">TSlideMenu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a1108e3cd98c051360fe848cba003b587"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ccd5eddeafce61763cf0f8debf3dab5"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_slide_menu.html#a0ccd5eddeafce61763cf0f8debf3dab5">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a0ccd5eddeafce61763cf0f8debf3dab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>左右滑动菜单控件。</p>
<p>一般用一组按钮作为子控件，通过左右滑动改变当前的项。除了当菜单使用外，也可以用来切换页面。</p>
<p>slide_menu_t是widget\_t的子类控件，widget_t的函数均适用于slide_menu_t控件。</p>
<p>在xml中使用"slide\_menu"标签创建左右滑动菜单控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">slide_menu</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;mask&quot;</span> <span class="keyword">align_v</span>=<span class="stringliteral">&quot;top&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;slide_button&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;0&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;slide_button&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;1&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;slide_button&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;2&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;slide_button&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;3&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">button</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;slide_button&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;4&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">slide_menu</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：<a href="&lt;/blockquote&gt; https://github.com/zlgopen/awtk/blob/master/design/default/ui/slide_menu.xml">slide_menu.xml</a></p>
<p>在c代码中使用函数slide_menu_create创建左右滑动菜单控件。如：</p>
<p>可按下面的方法关注当前项改变的事件：</p>
<p>可按下面的方法关注当前按钮被点击的事件：</p>
<blockquote class="doxtable">
<p>完整示例请参考：<a href="&lt;/blockquote&gt; https://github.com/zlgopen/awtk-c-demos/blob/master/demos/slide_menu.c">slide_menu demo</a></p>
<p>可用通过style来设置控件的显示风格，如背景颜色和蒙版颜色等等。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;mask&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span>     <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">mask_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考：<a href="&lt;/blockquote&gt; https://github.com/zlgopen/awtk/blob/master/design/default/styles/default.xml#L493">theme default</a> </p>
</blockquote>
</blockquote>
</blockquote>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a0ccd5eddeafce61763cf0f8debf3dab5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ccd5eddeafce61763cf0f8debf3dab5">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TSlideMenu::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建slide_menu对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a1314ade493180f3d4993718b00b37f11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1314ade493180f3d4993718b00b37f11">&#9670;&nbsp;</a></span>GetAlignV()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">align_v_t TSlideMenu::GetAlignV </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>垂直对齐方式。 </p>

</div>
</div>
<a id="a1c56e563a6d2d296392d4153171dde1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c56e563a6d2d296392d4153171dde1b">&#9670;&nbsp;</a></span>GetClip()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TSlideMenu::GetClip </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>是否动态裁剪菜单项(默认裁剪，不裁剪时，如果显示偶数项，左边会多一项)。 </p>

</div>
</div>
<a id="aafc5645fc595f3eac948f49059d50e86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafc5645fc595f3eac948f49059d50e86">&#9670;&nbsp;</a></span>GetMenuW()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TSlideMenu::GetMenuW </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>菜单项的宽度(后面加上px为像素点，不加px为相对百分比坐标0.0f到1.0f)(空字符串则使用控件高度)。 </p>

</div>
</div>
<a id="a3a98116591ec24b56575380c17fb05bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a98116591ec24b56575380c17fb05bc">&#9670;&nbsp;</a></span>GetMinScale()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float_t TSlideMenu::GetMinScale </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>最小缩放比例。 </p>

</div>
</div>
<a id="a095c560b4e3776df7561698400234525"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a095c560b4e3776df7561698400234525">&#9670;&nbsp;</a></span>GetSpacer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TSlideMenu::GetSpacer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>菜单项之间的间距。 </p>

</div>
</div>
<a id="acbefd47c544273f9c8b75fc4685474ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbefd47c544273f9c8b75fc4685474ec">&#9670;&nbsp;</a></span>GetValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TSlideMenu::GetValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>值。代表当前选中项的索引。 </p>

</div>
</div>
<a id="a70e44195c0d7ed83adccaef2d1604092"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70e44195c0d7ed83adccaef2d1604092">&#9670;&nbsp;</a></span>ScrollToNext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::ScrollToNext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>切换至下一项。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac1d46949432b6415acff3a84b4ffbe9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1d46949432b6415acff3a84b4ffbe9f">&#9670;&nbsp;</a></span>ScrollToPrev()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::ScrollToPrev </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>切换至上一项。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a74688e1f3124fe09e581a2f44796dae0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74688e1f3124fe09e581a2f44796dae0">&#9670;&nbsp;</a></span>SetAlignV()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::SetAlignV </td>
          <td>(</td>
          <td class="paramtype">align_v_t&#160;</td>
          <td class="paramname"><em>align_v</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置垂直对齐方式。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">align_v</td><td>对齐方式。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8b51ea81d6ea60c82e5b525bc325aaa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b51ea81d6ea60c82e5b525bc325aaa1">&#9670;&nbsp;</a></span>SetClip()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::SetClip </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>clip</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置是否动态裁剪菜单项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">clip</td><td>是否动态裁剪菜单项。(关闭后，如果显示偶数项，左边会多一项)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac38379ff086dbc64f134233ff6b0584e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac38379ff086dbc64f134233ff6b0584e">&#9670;&nbsp;</a></span>SetMenuW()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::SetMenuW </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>menu_w</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置菜单项的宽度。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">menu_w</td><td>菜单项的宽度。(后面加上px为像素点，不加px为相对百分比坐标0.0f到1.0f)(空字符串则使用控件高度)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a1b51f6780e395f094ff9072d5fc7889e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b51f6780e395f094ff9072d5fc7889e">&#9670;&nbsp;</a></span>SetMinScale()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::SetMinScale </td>
          <td>(</td>
          <td class="paramtype">float_t&#160;</td>
          <td class="paramname"><em>min_scale</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置最小缩放比例。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min_scale</td><td>最小缩放比例，范围[0.5-1]。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a872bbcefb4367a963acbfe248013e993"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a872bbcefb4367a963acbfe248013e993">&#9670;&nbsp;</a></span>SetSpacer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::SetSpacer </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>spacer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置菜单项之间的间距。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">spacer</td><td>菜单项之间的间距。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af6ae19cdb4dd5468d0c2793871ed82e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6ae19cdb4dd5468d0c2793871ed82e3">&#9670;&nbsp;</a></span>SetValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TSlideMenu::SetValue </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置当前项。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>当前项的索引。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
